package com.atguigu.utils
import java.io.InputStreamReader
import java.util.Properties

/**
  * 读取配置文件
  */
object PropertiesUtil {

  def load(propertieName:String): Properties ={
    val prop=new Properties()
    prop.load(new InputStreamReader(Thread.currentThread().getContextClassLoader.getResourceAsStream(propertieName) , "UTF-8"))
    prop
  }

  /**
    * 测试
    * @param args
    */
 /* def main(args: Array[String]): Unit = {
    val properties: Properties = load("config.properties")
    println(properties.getProperty("kafka.broker.list"))
  }*/
}
